﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" 
    xmlns:ee="http://schemas.microsoft.com/expression/2010/effects"
    xmlns:ctrls="clr-namespace:Pvp.App.Controls">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/ReuxablesLegacy;component/metal.xaml" />
        <ResourceDictionary Source="Templates.xaml" />
        <ResourceDictionary Source="MainWindowTemplate.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="RegularControlPanelStyle" TargetType="{x:Type ctrls:RegularControlPanel}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ctrls:RegularControlPanel}">
                    <Border BorderThickness="0,0,0,0">
                        <StackPanel>
                            <Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Height="15" Padding="6,0">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FFD4D4D4" Offset="0"/>
                                        <GradientStop Color="#FF676767" Offset="1"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                                <ctrls:CommandSlider IsMoveToPointEnabled="True" VerticalAlignment="Center"
                                               x:Name="PART_SeekSlider" 
                                               Minimum="0" Maximum="50"
                                               Style="{StaticResource SeekSliderStyle}"/>
                            </Border>

                            <Grid>
                                <Border Background="{StaticResource InnerDarkPart}" BorderBrush="{StaticResource InnerBrightPart}" BorderThickness="6,4" />

                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="*"/>
                                        <ColumnDefinition Width="Auto"/>
                                    </Grid.ColumnDefinitions>

                                    <Border CornerRadius="0,30,30,0" Background="{StaticResource InnerBrightPart}">
                                        <Border Padding="6,4" CornerRadius="24,30,30,24" Background="{StaticResource InnerDarkPart_Shift}"
                                            BorderBrush="{StaticResource InnerBrightPart}" BorderThickness="6,4,10,4">

                                            <StackPanel Orientation="Horizontal">
                                                <StackPanel Orientation="Horizontal">
                                                    <Button x:Name="PART_PlayButton" Style="{StaticResource MainButtonStyle}">
                                                        <Path Style="{StaticResource ArrowStyle}" >
                                                            <Path.RenderTransform>
                                                                <RotateTransform Angle="45"/>
                                                            </Path.RenderTransform>
                                                        </Path>
                                                    </Button>

                                                    <Button x:Name="PART_PauseButton" Style="{StaticResource MainButtonStyle}">
                                                        <StackPanel Orientation="Horizontal">
                                                            <Rectangle Fill="Black" Height="8" Width="2" Margin="0,0,4,0"/>
                                                            <Rectangle Fill="Black" Height="8" Width="2"/>
                                                        </StackPanel>
                                                    </Button>

                                                    <Button x:Name="PART_StopButton" Style="{StaticResource MainButtonStyle}">
                                                        <Rectangle Fill="Black" Height="8" Width="8"/>
                                                    </Button>
                                                </StackPanel>

                                                <StackPanel Orientation="Horizontal" Margin="10,0,0,0">
                                                    <Button x:Name="PART_ToBeginingButton" Style="{StaticResource MainButtonStyle}">
                                                        <StackPanel Orientation="Horizontal">
                                                            <Rectangle Fill="Black" Height="8" Width="2" Margin="0,0,3,0"/>
                                                            <Path Style="{StaticResource ArrowStyle}" >
                                                                <Path.RenderTransform>
                                                                    <RotateTransform Angle="225"/>
                                                                </Path.RenderTransform>
                                                            </Path>
                                                        </StackPanel>
                                                    </Button>

                                                    <Button x:Name="PART_BackwardButton" Style="{StaticResource MainButtonStyle}">
                                                        <StackPanel Orientation="Horizontal">
                                                            <Path Style="{StaticResource SmallerArrowStyle}" Margin="0,0,1.5,0" >
                                                                <Path.RenderTransform>
                                                                    <RotateTransform Angle="225"/>
                                                                </Path.RenderTransform>
                                                            </Path>
                                                            <Path Style="{StaticResource SmallerArrowStyle}" >
                                                                <Path.RenderTransform>
                                                                    <RotateTransform Angle="225"/>
                                                                </Path.RenderTransform>
                                                            </Path>
                                                        </StackPanel>
                                                    </Button>

                                                    <Button x:Name="PART_ForwardButton" Style="{StaticResource MainButtonStyle}">
                                                        <StackPanel Orientation="Horizontal">
                                                            <Path Style="{StaticResource SmallerArrowStyle}" >
                                                                <Path.RenderTransform>
                                                                    <RotateTransform Angle="45"/>
                                                                </Path.RenderTransform>
                                                            </Path>
                                                            <Path Style="{StaticResource SmallerArrowStyle}" Margin="1.5,0,0,0" >
                                                                <Path.RenderTransform>
                                                                    <RotateTransform Angle="45"/>
                                                                </Path.RenderTransform>
                                                            </Path>
                                                        </StackPanel>
                                                    </Button>

                                                    <Button x:Name="PART_ToEndButton" Style="{StaticResource MainButtonStyle}">
                                                        <StackPanel Orientation="Horizontal">
                                                            <Path Style="{StaticResource ArrowStyle}" >
                                                                <Path.RenderTransform>
                                                                    <RotateTransform Angle="45"/>
                                                                </Path.RenderTransform>
                                                            </Path>
                                                            <Rectangle Fill="Black" Height="8" Width="2" Margin="3,0,0,0"/>
                                                        </StackPanel>
                                                    </Button>
                                                </StackPanel>

                                                <ToggleButton x:Name="PART_RepeatButton" Width="31.2" Height="31.2" Margin="10,1,1,1" Template="{StaticResource ToggleButtonTemplate}">
                                                    <Path x:Name="Path" Width="14.533" Height="13.66" Stretch="Fill" Fill="Black" Data="F1 M 334.771,291.229C 337.531,291.455 340.292,291.681 342.385,292.398C 344.479,293.115 345.906,294.323 346.803,295.444C 347.7,296.566 348.066,297.6 348.181,298.477C 348.296,299.354 348.158,300.073 347.772,300.898C 347.385,301.724 346.75,302.656 345.969,303.458C 345.187,304.26 344.26,304.932 342.99,305.505C 341.719,306.078 340.104,306.552 338.667,306.844C 337.229,307.135 335.969,307.245 334.708,307.354L 334.677,309.823L 329.021,305.417L 334.771,301.042L 334.786,304.292C 336.115,304.292 337.443,304.292 338.792,304.076C 340.141,303.859 341.51,303.427 342.615,302.844C 343.719,302.26 344.557,301.526 345.192,300.876C 345.826,300.226 346.257,299.66 346.176,298.858C 346.095,298.056 345.503,297.017 344.694,296.134C 343.885,295.25 342.859,294.521 341.7,294.031C 340.542,293.542 339.25,293.292 338.063,293.177C 336.875,293.063 335.792,293.083 334.708,293.104L 334.771,291.229 Z "/>
                                                </ToggleButton>

                                            </StackPanel>
                                        </Border>
                                    </Border>

                                    <Border Background="{StaticResource InnerDarkPart}" BorderBrush="{StaticResource InnerBrightPart}" 
                                        CornerRadius="0" BorderThickness="0,4,6,4" Grid.Column="2">
                                        <Grid>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="*" />
                                            </Grid.RowDefinitions>

                                            <Border Background="{StaticResource InnerBrightPart}" Padding="14,0,0,5" CornerRadius="0,0,0,24">
                                                <StackPanel Orientation="Horizontal">
                                                    <ToggleButton x:Name="PART_MuteButton" Height="16" Width="24" Margin="0,0,7,0" Template="{StaticResource ToggleButtonTemplate_Volume}">
                                                        <Path Margin="0,1,1,0" Stroke="Black" Fill="Black" StrokeThickness="1" SnapsToDevicePixels="True">
                                                            <Path.Data>
                                                                <PathGeometry>
                                                                    <PathFigure StartPoint="0,3" IsClosed="True" IsFilled="False">
                                                                        <PolyLineSegment Points="1,3 1,6, 0,6"/>
                                                                    </PathFigure>
                                                                    <PathFigure StartPoint="3,3" IsClosed="True" IsFilled="True">
                                                                        <PolyLineSegment Points="6,0 6,9 3,6" />
                                                                    </PathFigure>
                                                                </PathGeometry>
                                                            </Path.Data>
                                                        </Path>
                                                    </ToggleButton>

                                                    <ctrls:CommandSlider IsMoveToPointEnabled="True" VerticalAlignment="Center"
                                                                 x:Name="PART_VolumeSlider" 
                                                                 Width="100"
                                                                 Minimum="0" Maximum="50"
                                                                 Style="{StaticResource VolumeSliderStyle}"/>

                                                </StackPanel>
                                            </Border>

                                            <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,0,6,0"
                                                        HorizontalAlignment="Right" VerticalAlignment="Center">
                                                <TextBlock x:Name="PART_CurrentPosition" Foreground="{StaticResource TextBrush}" />
                                                <TextBlock Text=" / " Foreground="{StaticResource TextBrush}" />
                                                <TextBlock x:Name="PART_Duration" Foreground="{StaticResource TextBrush}" />
                                            </StackPanel>

                                        </Grid>
                                    </Border>
                                </Grid>
                            </Grid>

                        </StackPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="FullScreenControlPanelStyle" TargetType="{x:Type ctrls:FullScreenControlPanel}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ctrls:FullScreenControlPanel}">

                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup Name="MouseStates">
                                <VisualState Name="MouseEnter">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="outerBorder">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState Name="MouseLeave" />
                                <VisualStateGroup.Transitions>
                                    <VisualTransition To="MouseLeave" GeneratedDuration="00:00:1.5"/>
                                    <VisualTransition To="MouseEnter" GeneratedDuration="00:00:0.5"/>
                                </VisualStateGroup.Transitions>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border x:Name="outerBorder" BorderThickness="0,0,0,0" Opacity="0">
                            <StackPanel>
                                <Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Height="15" Padding="6,0">
                                    <Border.Background>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FFD4D4D4" Offset="0"/>
                                            <GradientStop Color="#FF676767" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Border.Background>
                                    <ctrls:CommandSlider IsMoveToPointEnabled="True" VerticalAlignment="Center"
                                               x:Name="PART_SeekSlider" 
                                               Minimum="0" Maximum="50"
                                               Style="{StaticResource SeekSliderStyle}"/>
                                </Border>

                                <Grid>
                                    <Border Background="{StaticResource InnerDarkPart}" BorderBrush="{StaticResource InnerBrightPart}" BorderThickness="6,4" />

                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="*"/>
                                            <ColumnDefinition Width="Auto"/>
                                        </Grid.ColumnDefinitions>

                                        <Border CornerRadius="0,30,30,0" Background="{StaticResource InnerBrightPart}">
                                            <Border Padding="6,4" CornerRadius="24,30,30,24" Background="{StaticResource InnerDarkPart_Shift}"
                                            BorderBrush="{StaticResource InnerBrightPart}" BorderThickness="6,4,10,4">

                                                <StackPanel Orientation="Horizontal">
                                                    <StackPanel Orientation="Horizontal">
                                                        <Button x:Name="PART_PlayButton" Style="{StaticResource MainButtonStyle}">
                                                            <Path Style="{StaticResource ArrowStyle}" >
                                                                <Path.RenderTransform>
                                                                    <RotateTransform Angle="45"/>
                                                                </Path.RenderTransform>
                                                            </Path>
                                                        </Button>

                                                        <Button x:Name="PART_PauseButton" Style="{StaticResource MainButtonStyle}">
                                                            <StackPanel Orientation="Horizontal">
                                                                <Rectangle Fill="Black" Height="8" Width="2" Margin="0,0,4,0"/>
                                                                <Rectangle Fill="Black" Height="8" Width="2"/>
                                                            </StackPanel>
                                                        </Button>

                                                        <Button x:Name="PART_StopButton" Style="{StaticResource MainButtonStyle}">
                                                            <Rectangle Fill="Black" Height="8" Width="8"/>
                                                        </Button>
                                                    </StackPanel>

                                                    <StackPanel Orientation="Horizontal" Margin="10,0,0,0">
                                                        <Button x:Name="PART_ToBeginingButton" Style="{StaticResource MainButtonStyle}">
                                                            <StackPanel Orientation="Horizontal">
                                                                <Rectangle Fill="Black" Height="8" Width="2" Margin="0,0,3,0"/>
                                                                <Path Style="{StaticResource ArrowStyle}" >
                                                                    <Path.RenderTransform>
                                                                        <RotateTransform Angle="225"/>
                                                                    </Path.RenderTransform>
                                                                </Path>
                                                            </StackPanel>
                                                        </Button>

                                                        <Button x:Name="PART_BackwardButton" Style="{StaticResource MainButtonStyle}">
                                                            <StackPanel Orientation="Horizontal">
                                                                <Path Style="{StaticResource SmallerArrowStyle}" Margin="0,0,1.5,0" >
                                                                    <Path.RenderTransform>
                                                                        <RotateTransform Angle="225"/>
                                                                    </Path.RenderTransform>
                                                                </Path>
                                                                <Path Style="{StaticResource SmallerArrowStyle}" >
                                                                    <Path.RenderTransform>
                                                                        <RotateTransform Angle="225"/>
                                                                    </Path.RenderTransform>
                                                                </Path>
                                                            </StackPanel>
                                                        </Button>

                                                        <Button x:Name="PART_ForwardButton" Style="{StaticResource MainButtonStyle}">
                                                            <StackPanel Orientation="Horizontal">
                                                                <Path Style="{StaticResource SmallerArrowStyle}" >
                                                                    <Path.RenderTransform>
                                                                        <RotateTransform Angle="45"/>
                                                                    </Path.RenderTransform>
                                                                </Path>
                                                                <Path Style="{StaticResource SmallerArrowStyle}" Margin="1.5,0,0,0" >
                                                                    <Path.RenderTransform>
                                                                        <RotateTransform Angle="45"/>
                                                                    </Path.RenderTransform>
                                                                </Path>
                                                            </StackPanel>
                                                        </Button>

                                                        <Button x:Name="PART_ToEndButton" Style="{StaticResource MainButtonStyle}">
                                                            <StackPanel Orientation="Horizontal">
                                                                <Path Style="{StaticResource ArrowStyle}" >
                                                                    <Path.RenderTransform>
                                                                        <RotateTransform Angle="45"/>
                                                                    </Path.RenderTransform>
                                                                </Path>
                                                                <Rectangle Fill="Black" Height="8" Width="2" Margin="3,0,0,0"/>
                                                            </StackPanel>
                                                        </Button>
                                                    </StackPanel>

                                                    <ToggleButton x:Name="PART_RepeatButton" Width="31.2" Height="31.2" Margin="10,1,1,1" Template="{StaticResource ToggleButtonTemplate}">
                                                        <Path x:Name="Path" Width="14.533" Height="13.66" Stretch="Fill" Fill="Black" Data="F1 M 334.771,291.229C 337.531,291.455 340.292,291.681 342.385,292.398C 344.479,293.115 345.906,294.323 346.803,295.444C 347.7,296.566 348.066,297.6 348.181,298.477C 348.296,299.354 348.158,300.073 347.772,300.898C 347.385,301.724 346.75,302.656 345.969,303.458C 345.187,304.26 344.26,304.932 342.99,305.505C 341.719,306.078 340.104,306.552 338.667,306.844C 337.229,307.135 335.969,307.245 334.708,307.354L 334.677,309.823L 329.021,305.417L 334.771,301.042L 334.786,304.292C 336.115,304.292 337.443,304.292 338.792,304.076C 340.141,303.859 341.51,303.427 342.615,302.844C 343.719,302.26 344.557,301.526 345.192,300.876C 345.826,300.226 346.257,299.66 346.176,298.858C 346.095,298.056 345.503,297.017 344.694,296.134C 343.885,295.25 342.859,294.521 341.7,294.031C 340.542,293.542 339.25,293.292 338.063,293.177C 336.875,293.063 335.792,293.083 334.708,293.104L 334.771,291.229 Z "/>
                                                    </ToggleButton>

                                                </StackPanel>
                                            </Border>
                                        </Border>

                                        <Border Background="{StaticResource InnerDarkPart}" BorderBrush="{StaticResource InnerBrightPart}" 
                                        CornerRadius="0" BorderThickness="0,4,6,4" Grid.Column="2">
                                            <Grid>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="Auto" />
                                                    <RowDefinition Height="Auto" />
                                                </Grid.RowDefinitions>

                                                <Border Background="{StaticResource InnerBrightPart}" Padding="14,0,0,5" CornerRadius="0,0,0,24">
                                                    <StackPanel Orientation="Horizontal">
                                                        <ToggleButton x:Name="PART_MuteButton" Height="16" Width="24" Margin="0,0,7,0" Template="{StaticResource ToggleButtonTemplate_Volume}">
                                                            <Path Margin="0,1,1,0" Stroke="Black" Fill="Black" StrokeThickness="1" SnapsToDevicePixels="True">
                                                                <Path.Data>
                                                                    <PathGeometry>
                                                                        <PathFigure StartPoint="0,3" IsClosed="True" IsFilled="False">
                                                                            <PolyLineSegment Points="1,3 1,6, 0,6"/>
                                                                        </PathFigure>
                                                                        <PathFigure StartPoint="3,3" IsClosed="True" IsFilled="True">
                                                                            <PolyLineSegment Points="6,0 6,9 3,6" />
                                                                        </PathFigure>
                                                                    </PathGeometry>
                                                                </Path.Data>
                                                            </Path>
                                                        </ToggleButton>

                                                        <ctrls:CommandSlider IsMoveToPointEnabled="True" VerticalAlignment="Center"
                                                                 x:Name="PART_VolumeSlider" 
                                                                 Width="100"
                                                                 Minimum="0" Maximum="50"
                                                                 Style="{StaticResource VolumeSliderStyle}"/>

                                                    </StackPanel>
                                                </Border>

                                                <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,0,6,0"
                                                        HorizontalAlignment="Right" VerticalAlignment="Center">
                                                    <TextBlock x:Name="PART_CurrentPosition" Foreground="{StaticResource TextBrush}" />
                                                    <TextBlock Text=" / " Foreground="{StaticResource TextBrush}" />
                                                    <TextBlock x:Name="PART_Duration" Foreground="{StaticResource TextBrush}" />
                                                </StackPanel>

                                            </Grid>
                                        </Border>
                                    </Grid>
                                </Grid>

                            </StackPanel>
                        </Border>
                        
                    </Grid>
                    
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
</ResourceDictionary>